<?php
include('./conn.php');
    
    $username=$_REQUEST['username'];
    $password=$_REQUEST['password'];
    $phone=$_REQUEST['phone'];
    $email=$_REQUEST['email'];

    $sql="insert into users(username,password,phone,email) values('$username','$password','$phone','$email')";
    
    $result=$mysqli->query($sql);

    if($result){
        echo "<script>alert('注册成功');location.href='../html/index1.html';</script>";
    }else{
        echo "<script>alert('存在问题，请关闭页面后重新注册');location.href='../html/index1.html';</script>";
    }
    $mysqli->close();
?>